<?php

/**
 * Radcodes - SocialEngine Module
 *
 * @category   Application_Extensions
 * @package    Badge
 * @copyright  Copyright (c) 2009-2010 Radcodes LLC (http://www.radcodes.com)
 * @license    http://www.radcodes.com/license/
 * @version    $Id$
 * @author     Vincent Van <vincent@radcodes.com>
 */
 
?>

<?php if ($this->award): ?>
  <?php 
    $award = $this->award;
    $badge = $this->award->getBadge();
    $user = $this->award->getUser();
  ?>
  
  <div class="badge_featured_award">
    <div class="badge_featured_award_photo">
      <?php echo $this->htmlLink($user->getHref(), $this->itemPhoto($user, 'thumb.profile')); ?>
    </div>
    <div class="badge_featured_award_content">
      <?php echo $this->htmlLink($this->award->getHref(),
        $this->radcodes()->text()->truncate($this->award->getTitle(), 36),
        array('class' => 'badge_featured_award_title')
      );?>
      <div class="badge_featured_award_meta">
        <div class="badge_featured_award_meta_photo">
          <?php echo $this->htmlLink($badge->getHref(), $this->itemPhoto($badge, 'thumb.icon')); ?>
        </div>
        <div class="badge_featured_award_meta_info">
          <div><?php echo $this->translate('Awarded %1$s with %2$s badge', $user->__toString(), $badge->__toString()); ?></div>
          <div>
            <?php echo $this->timestamp($award->creation_date); ?>
            -
            <?php echo $this->translate(array("%s comment", "%s comments", $award->comment_count), $this->locale()->toNumber($award->comment_count)); ?>
            -
            <?php echo $this->translate(array('%1$s like', '%1$s likes', $award->like_count), $this->locale()->toNumber($award->like_count)); ?>
          </div>
        </div>
      </div>
      <div class="badge_featured_award_body">
        <?php echo $this->viewMore($this->award->getDescription()) ?>
      </div>
    </div>
  </div>

<?php endif; ?>